home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / LGP250S1.ZIP / src / libgplus.5 / libgplus / gplus-in / stdio.h < prev    next >
C/C++ Source or Header  |  1993-04-17  |  4KB  |  177 lines

  1. // This may look like C code, but it is really -*- C++ -*-
  2. /* 
  3. Copyright (C) 1988 Free Software Foundation
  4.     written by Doug Lea (dl@rocky.oswego.edu)
  5.  
  6. This file is part of the GNU C++ Library.  This library is free
  7. software; you can redistribute it and/or modify it under the terms of
  8. the GNU Library General Public License as published by the Free
  9. Software Foundation; either version 2 of the License, or (at your
  10. option) any later version.  This library is distributed in the hope
  11. that it will be useful, but WITHOUT ANY WARRANTY; without even the
  12. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  13. PURPOSE.  See the GNU Library General Public License for more details.
  14. You should have received a copy of the GNU Library General Public
  15. License along with this library; if not, write to the Free Software
  16. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18.  
  19. #ifndef _stdio_h
  20. #ifdef __GNUG__
  21. #pragma interface
  22. #endif
  23.  
  24. #ifdef __stdio_h_recursive
  25. #include_next <stdio.h>
  26. #else
  27. #define __stdio_h_recursive
  28.  
  29. // Note:  The #define _stdio_h is at the end of this file,
  30. // in case #include_next <stdio.h> finds an installed version of this
  31. // same file -- we want it to continue until it finds the C version.
  32.  
  33. #include <_G_config.h>
  34.  
  35. extern "C" {
  36.  
  37. #undef NULL
  38.  
  39. #define fdopen __hide_fdopen
  40. #define fopen __hide_fopen
  41. #define fprintf __hide_fprintf
  42. #define fputs __hide_fputs
  43. #define fread __hide_fread
  44. #define freopen __hide_freopen
  45. #define fscanf __hide_fscanf
  46. #define ftell __hide_ftell
  47. #define fwrite __hide_fwrite
  48. #define new __hide_new /* In case 'new' is used as a parameter name. */
  49. #define perror __hide_perror
  50. #define popen __hide_popen
  51. #define printf __hide_printf
  52. #define puts __hide_puts
  53. #define putw __hide_putw
  54. #define rewind __hide_rewind
  55. #define tempnam __hide_tempnam
  56. #define scanf __hide_scanf
  57. #define setbuf __hide_setbuf
  58. #define setbuffer __hide_setbuffer
  59. #define setlinebuf __hide_setlinebuf
  60. #define setvbuf __hide_setvbuf
  61. #define sprintf __hide_sprintf
  62. #define sscanf __hide_sscanf
  63. #define tempnam __hide_tempnam
  64. #define vfprintf __hide_vfprintf
  65. #define vprintf __hide_vprintf
  66. #define vsprintf __hide_vsprintf
  67. #define _flsbuf __hide__flsbuf
  68.  
  69. #include_next <stdio.h>
  70.  
  71. #undef fdopen
  72. #undef fopen
  73. #undef fprintf
  74. #undef fputs
  75. #undef fread
  76. #undef freopen
  77. #undef fscanf
  78. #undef ftell
  79. #undef fwrite
  80. #undef new
  81. #undef perror
  82. #undef popen
  83. #undef printf
  84. #undef puts
  85. #undef putw
  86. /* SCO defines remove to call unlink; that's very dangerous for us.  */
  87. #undef remove
  88. #undef rewind
  89. #undef tempnam
  90. #undef scanf
  91. #undef setbuf
  92. #undef setbuffer
  93. #undef setlinebuf
  94. #undef setvbuf
  95. #undef sprintf
  96. #undef sscanf
  97. #undef tempnam
  98. #undef vprintf
  99. #undef vfprintf
  100. #undef vsprintf
  101. #undef _flsbuf
  102.  
  103. #ifndef NULL
  104. #define NULL _G_NULL
  105. #endif
  106.  
  107. #ifndef size_t
  108. #define size_t _G_size_t
  109. #endif
  110. }
  111.  
  112. extern "C" {
  113.  
  114. int    fclose(FILE*);
  115. FILE*  fdopen(int, const char*);
  116. int    fflush(FILE*);
  117. int    fgetc(FILE*);
  118. char*  fgets _G_ARGS((char*, int, FILE *));
  119. FILE*  fopen(const char*, const char*);
  120. int    fprintf(FILE*, const char* ...);
  121. int    fputc(int, FILE*);
  122. int    fputs(const char*, FILE*);
  123. size_t fread(void*, size_t, size_t, FILE*);
  124. #ifdef VMS
  125. FILE*  freopen(const char*, const char*, FILE* ...);
  126. #else
  127. FILE*  freopen(const char*, const char*, FILE*);
  128. #endif
  129. int    fscanf(FILE*, const char* ...);
  130. int    fseek(FILE*, long, int);
  131. long   ftell(FILE *);
  132. size_t fwrite(const void*, size_t, size_t, FILE*);
  133. char*  gets(char*);
  134. int    getw(FILE*);
  135. int    pclose(FILE*);
  136. void   perror(const char*);
  137. FILE*  popen(const char*, const char*);
  138. int    printf(const char* ...);
  139. int    puts(const char*);
  140. int    putw(int, FILE*);
  141. int    rewind(FILE*);
  142. int    scanf(const char* ...);
  143. void   setbuf(FILE*, char*);
  144. void   setbuffer(FILE*, char*, int);
  145. int    setlinebuf(FILE*);
  146. int    setvbuf(FILE*, char*, int, size_t);
  147. int    sscanf(char*, const char* ...);
  148. FILE*  tmpfile();
  149. int    ungetc(int, FILE*);
  150. int    vfprintf _G_ARGS((FILE*, const char*, _G_va_list));
  151. int    vprintf _G_ARGS((const char*, _G_va_list));
  152. _G_sprintf_return_type sprintf _G_ARGS((char*, const char* ...));
  153. _G_sprintf_return_type vsprintf _G_ARGS((char*, const char*, _G_va_list));
  154.  
  155. extern int _filbuf _G_ARGS((FILE*));
  156. extern int _flsbuf _G_ARGS((unsigned, FILE*));
  157.  
  158. }
  159.  
  160. #ifndef L_ctermid
  161. #define L_ctermid    9 
  162. #endif
  163. #ifndef L_cuserid
  164. #define L_cuserid    9
  165. #endif
  166. #ifndef P_tmpdir
  167. #define    P_tmpdir    "/tmp/"
  168. #endif
  169. #ifndef L_tmpnam
  170. #define    L_tmpnam    (sizeof(P_tmpdir) + 15)
  171. #endif
  172.  
  173. #define _stdio_h 1
  174.  
  175. #endif
  176. #endif // _stdio_h
  177.